#ifndef PAGEUSERINFO_H
#define PAGEUSERINFO_H

#include <QWidget>
#include "core/databasepool/databasepool.h"
#include "core/threadpool/threadpool.h"
#include "modules/user-management/usermanagement.h"
#include "modules/device-management/devicemanagement.h"
#include "mainbar.h"
#include <QSqlTableModel>

namespace Ui {
class pageUserInfo;
}

class pageUserInfo : public QWidget
{
    Q_OBJECT

public:
    explicit pageUserInfo(Mainbar *mainbar, QWidget *parent = nullptr);
    ~pageUserInfo();

signals:
    void sendMessage(const QString &);
    int display(int);
    void sendUsername(const QString &);

public slots:
    void receiveUsername(const QString &); // 新增槽函数

private:
    Ui::pageUserInfo *ui;
    // 创建用户管理对象，自动创建用户表
    UserManagement m_userMgr;
    QMap<QString, QVariant> userInfo;
    QString loginUsername = "";
    Mainbar *m_mainbar;
};

#endif // PAGEUSERINFO_H
